import storage, { setToken } from '../../utils/storage';
import styles from './login.module.scss';

const Login: React.FC = () => {
    return <div className={styles.container}>
        <div className={styles.card}>
            <img className={styles.logo} src="/logo.svg" alt="" />
            <div className={styles.form}>
                <input type="text" className={styles.input} placeholder="请输入账号" />
                <input type="password" className={styles.input} placeholder="请输入密码" />
                <div className={styles.submit} onClick={() => {
                    setToken("balabala...");
                    storage.setObject('userInfo', {
                        name: 'Barry',
                        avatar: 'http://via.placeholder.com/10x10'
                    })
                    window.location.replace("/")
                }}>登录</div>
                <a className={styles.create} href="">创建用户</a>
            </div>
        </div>
    </div>
}

export default Login;